module.exports = {
  name: 'uniapp-vant-weapp',
  build: {
    css: {
      preprocessor: 'less',
    },
    site: {
      publicPath: '/uniapp-vant-weapp/',
    },
  },
  site: {
    title: 'uniapp-vant-weapp',
    logo: 'https://img.yzcdn.cn/vant/logo.png',
    description: '',
    simulator: {
      url: 'http://localhost:3217/',
      routeMapper: (path) => {
        console.log(path);
        const map = {
          '/common': '/style',
          '/transition': '/style',
        };
        console.log(`/${map[path] || `pages${path}/index`}`);
        return `/${map[path] || `pages${path}/index`}`;
      },
      syncPathFromSimulator: false,
    },
    nav: [
      {
        title: '开发指南',
        items: [
          {
            path: 'home',
            title: '介绍',
          },
          {
            path: 'quickstart',
            title: '快速上手',
          },
        ],
      },
      {
        title: '基础组件',
        items: [
          {
            path: 'cell',
            title: 'Cell 单元格',
          },
          {
            path: 'button',
            title: 'Button 按钮',
          },
        ],
      },
    ],
  },
};
